/**
 * Selling Partner API for Replenishment
 * The Selling Partner API for Replenishment (Replenishment API) provides programmatic access to replenishment program metrics and offers. These programs provide recurring delivery of any replenishable item at a frequency chosen by the customer.  The Replenishment API is available worldwide wherever Amazon Subscribe & Save is available or is supported. The API is available to vendors and FBA selling partners.
 *
 * The version of the OpenAPI document: 2022-11-07
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */

import { ApiClient } from '../ApiClient.js'
import { GetSellingPartnerMetricsResponseMetric } from './GetSellingPartnerMetricsResponseMetric.js'

/**
 * The GetSellingPartnerMetricsResponse model module.
 * @module replenishment_v2022_11_07/model/GetSellingPartnerMetricsResponse
 * @version 2022-11-07
 */
export class GetSellingPartnerMetricsResponse {
  /**
   * Constructs a new <code>GetSellingPartnerMetricsResponse</code>.
   * The response schema for the &#x60;getSellingPartnerMetrics&#x60; operation.
   * @alias module:replenishment_v2022_11_07/model/GetSellingPartnerMetricsResponse
   * @class
   */
  constructor () {
  }

  /**
   * Constructs a <code>GetSellingPartnerMetricsResponse</code> from a plain JavaScript object, optionally creating a new instance.
   * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
   * @param {Object} data The plain JavaScript object bearing properties of interest.
   * @param {GetSellingPartnerMetricsResponse} obj Optional instance to populate.
   * @return {GetSellingPartnerMetricsResponse} The populated <code>GetSellingPartnerMetricsResponse</code> instance.
   */
  static constructFromObject (data, obj) {
    if (data) {
      switch (typeof data) {
        case 'string':
          obj = String(data)
          break
        case 'number':
          obj = Number(data)
          break
        case 'boolean':
          obj = Boolean(data)
          break
      }
      obj = obj || new GetSellingPartnerMetricsResponse()
      if (data.hasOwnProperty('metrics')) { obj.metrics = ApiClient.convertToType(data.metrics, [GetSellingPartnerMetricsResponseMetric]) }
    }
    return obj
  }
}

/**
 * A list of metrics data for the selling partner.
 * @member {[GetSellingPartnerMetricsResponseMetric]} metrics
 * @type {[GetSellingPartnerMetricsResponseMetric]}
 */
GetSellingPartnerMetricsResponse.prototype.metrics = undefined
